"""
邮件发送表迁移脚本
"""
from sqlalchemy import create_engine
from config import settings
from database import Base
from models.email_task import EmailTask, EmailSendRecord

def create_email_send_tables():
    """创建邮件发送相关表"""
    # 创建数据库引擎
    engine = create_engine(settings.database_url)
    
    # 创建表
    Base.metadata.create_all(bind=engine, tables=[EmailTask.__table__, EmailSendRecord.__table__])
    
    print("✅ 邮件发送相关表创建成功")

if __name__ == "__main__":
    create_email_send_tables()
